package utgame.com.fakelegendary.model;

/**
 * Created by xueal on 2018/1/23.
 */

public class Ball {

    private float x;
    private float y;
    private float r;    // 半径

    private static final float RadiusIncStep = 2;

    public Ball(float x, float y, float r) {
        this.x = x;
        this.y = y;
        this.r = r;
    }


    public float getX() {
        return x;
    }

    public void setX(float x) {
        this.x = x;
    }

    public float getY() {
        return y;
    }

    public void setY(float y) {
        this.y = y;
    }

    public float getR() {
        return r;
    }

    public void setR(float r) {
        this.r = r;
    }

    public void incR(){
        r += RadiusIncStep;
    }

    public boolean isValid(){
        return (x > 0 && y > 0 && r > 0);
    }
}
